// FindString.cpp: implementation of the CFindString class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "FindString.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CFindString::CFindString()
{

}

CFindString::~CFindString()
{

}

BOOL CFindString::FindSubString(CString sSource,CString sDest)
{
	int startPos = 0;
	
	int endPos = 0;
	
	while((endPos=sSource.Find(",",startPos)) != -1)
	{
		CString sSubString = sSource.Mid(startPos,endPos-startPos);
		if(sSubString == sDest)
		{
			return TRUE;
		}
		else
		{
			startPos = endPos+1;
		}
	}
	return FALSE;
}
